﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Fixx.Connector;
namespace FixxPlayground
{
    class Program
    {
        static void Main(string[] args)
        {
			Console.WriteLine("Please enter your username:");
			string username = Console.ReadLine();
			Console.WriteLine("Please enter your password:");
			string password = Console.ReadLine();
			Console.WriteLine("Please enter your host:");
			string host = Console.ReadLine();
            FixxSettings settings = new FixxSettings(username, password, host, 80, TransportLayer.XML);
            FixxRepository repos = new FixxRepository(settings);
            repos.Login(
                p =>
                {
					Console.WriteLine(p.Username);
                    repos.GetProjectsAsync(
						s =>  
						{
							
						},
						(e) => { Console.Error.WriteLine(e.Message); }
					);
                },
                error => Console.Error.WriteLine(error.Message)
            );
            Console.ReadLine();

        }

        
    }
}
